/*
 * @描述: 卡信息 service层
 * @Author: /zlh
 * @Date: 2021-10-13 09:26:22
 * @Last Modified by: zlh
 * @Last Modified time: 2021-10-13 11:55:58
 */

import request from '@/utils/request';
import { secMap } from '@/configs/api.map';

const { api_updateCityBusiness, api_getCityBusiness,
    api_getCityBusinessReport, api_deleteCityBusiness, api_saveCityBusiness,
    api_report, api_getCityBuzzConfigList, api_getCityOfficialConfigList,
    api_deleOfficialConfig, api_saveCityOfficialConfigInfo,
    api_getAvgWage, api_saveHistoricalAvgWage,
    api_getSecurityIaByCityCode, api_addOrUpdateSecurityIa, api_deleteSecurityIa,
    api_getCityConfigByCityCode, api_updateCityLogConfig,
    api_updateCityCustomerServiceConfig, api_selectCitySpiderConfig,
    api_getCityThirdPartyByPage, api_saveCitySpiderConfig,
    api_updateCityThirdParty, api_addCityThirdParty } = secMap;
/**
 * @description 获取城市社保、公积金业务管理列表
 * @author zlh
 * @date 2021-06-15
 * @export
 * @param {object} channel
 * @returns
 */
export async function getCityBusiness(channel) {
    return request(api_getCityBusiness, {
        method: 'POST',
        data: {
            ...channel,
        },
    });
}
/**
 * @description 获取城市业务报表
 * @author zlh
 * @date 2021-04-29
 * @export
 * @param {object} channel
 * @returns
 */
export async function getCityBusinessReport(channel) {
    return request(api_getCityBusinessReport, {
        method: 'POST',
        data: {
            ...channel,
        },
    });
}
/**
 * @description 更新社保、公积金城市业务
 * @author zlh
 * @date 2021-10-13
 * @export
 * @param {object} channel
 * @returns
 */
export async function updateCityBusiness(channel) {
    return request(api_updateCityBusiness, {
        method: 'POST',
        data: {
            ...channel,
        },
        params: { statusType: 'update' }
    });
}

/**
 * @description 新增社保、公积金城市业务
 * @author zlh
 * @date 2021-10-14
 * @export
 * @param {object} data
 * @returns
 */
export async function saveCityBusiness(data, type) {
    return request(api_saveCityBusiness, {
        method: 'POST',
        data,
        params: { statusType: type }
    });
}
/**
 * @description 删除城市官网信息
 * @author zlh
 * @date 2021-10-14
 * @export
 * @param {object} data
 * @returns
 */
export async function deleteCityBusiness(data) {
    return request(api_deleteCityBusiness, {
        method: 'POST',
        data,
        params: { ...data }
    });
}
/**
 * @description 查询城市业务报表
 * @author zlh
 * @date 2021-10-14
 * @export
 * @param {object} data
 * @returns
 */
export async function getReportList(data) {
    return request(api_report, {
        method: 'POST',
        data,
        params: { ...data }
    });
}
/**
 * @description 查询城市关联业务
 * @author zlh
 * @date 2021-06-15
 * @export
 * @param {object} params
 * @returns
 */
export async function getCityBuzzConfigList(params) {
    return request(api_getCityBuzzConfigList, {
        method: 'POST',
        data: {
            ...params,
        },
    });
}
/**
 * @description 查询城市官网信息配置列表
 * @author zlh
 * @date 2021-10-25
 * @export
 * @param {object} data
 * @returns
 */
export async function getCityOfficialConfigList(data) {
    return request(api_getCityOfficialConfigList, {
        method: 'POST',
        data
    });
}

/**
 * @description 保存城市官网信息
 * @author zlh
 * @date 2021-10-26
 * @export
 * @param {object} data
 * @returns
 */
export async function saveCityOfficialConfigInfo(data) {
    return request(api_saveCityOfficialConfigInfo, {
        method: 'POST',
        data
    });
}
/**
 * @description 保存城市官网信息
 * @author zlh
 * @date 2021-10-26
 * @export
 * @param {object} data
 * @returns
 */
export async function deleOfficialConfig(data) {
    return request(api_deleOfficialConfig, {
        method: 'POST',
        data
    });
}
/**
 * @description 查询城市平均工资
 * @author zlh
 * @date 2021-10-26
 * @export
 * @param {object} data
 * @returns
 */
export async function getAvgWage(data) {
    return request(api_getAvgWage, {
        method: 'POST',
        data
    });
}
/**
 * @description 批量保存城市平均工资信息
 * @author zlh
 * @date 2021-10-26
 * @export
 * @param {object} data
 * @returns
 */
export async function saveHistoricalAvgWage(data) {
    return request(api_saveHistoricalAvgWage, {
        method: 'POST',
        data
    });
}
/**
 * @description 查询城市社保用途配置列表
 * @author zlh
 * @date 2021-10-26
 * @export
 * @param {object} data
 * @returns
 */
export async function getSecurityIaByCityCode(data) {
    return request(api_getSecurityIaByCityCode, {
        method: 'POST',
        data
    });
}
/**
 * @description 新增or更新城市社保用途配置信息
 * @author zlh
 * @date 2021-10-26
 * @export
 * @param {object} data
 * @returns
 */
export async function addOrUpdateSecurityIa(data) {
    return request(api_addOrUpdateSecurityIa, {
        method: 'POST',
        data
    });
}
/**
 * @description 删除城市社保用途
 * @author zlh
 * @date 2021-10-26
 * @export
 * @param {object} data
 * @returns
 */
export async function deleteSecurityIa(data) {
    return request(api_deleteSecurityIa, {
        method: 'POST',
        data
    });
}
/**
 * @description 根据城市编码查询城市配置
 * @author zlh
 * @date 2021-10-27
 * @export
 * @param {object} data
 * @returns
 */
export async function getCityConfigByCityCode(data) {
    return request(api_getCityConfigByCityCode, {
        method: 'POST',
        data
    });
}
/**
 * @description 保存城市日志配置
 * @author zlh
 * @date 2021-10-27
 * @export
 * @param {object} data
 * @returns
 */
export async function updateCityLogConfig(data) {
    return request(api_updateCityLogConfig, {
        method: 'POST',
        data
    });
}
/**
 * @description 更新城市客服配置
 * @author zlh
 * @date 2021-10-27
 * @export
 * @param {object} data
 * @returns
 */
export async function updateCityCustomerServiceConfig(data) {
    return request(api_updateCityCustomerServiceConfig, {
        method: 'POST',
        data
    });
}
/**
 * @description 查询城市爬虫抓取服务配置
 * @author zlh
 * @date 2021-11-01
 * @export
 * @param {object} data
 * @returns
 */
export async function selectCitySpiderConfig(data) {
    return request(api_selectCitySpiderConfig, {
        method: 'POST',
        data
    });
}
/**
 * @description 保存城市爬虫抓取服务配置
 * @author zlh
 * @date 2021-11-01
 * @export
 * @param {object} data
 * @returns
 */
export async function saveCitySpiderConfig(data) {
    return request(api_saveCitySpiderConfig, {
        method: 'POST',
        data
    });
}
/**
 * @description 获取城市第三方配置信息
 * @author zlh
 * @date 2021-11-01
 * @export
 * @param {object} data
 * @returns
 */
export async function getCityThirdPartyByPage(data) {
    return request(api_getCityThirdPartyByPage, {
        method: 'POST',
        data
    });
}
/**
 * @description 添加城市第三方配置信息
 * @author zlh
 * @date 2021-11-01
 * @export
 * @param {object} data
 * @returns
 */
export async function addCityThirdParty(data) {
    return request(api_addCityThirdParty, {
        method: 'POST',
        data
    });
}

/**
 * @description 更新城市第三方配置信息
 * @author zlh
 * @date 2021-11-01
 * @export
 * @param {object} data
 * @returns
 */
export async function updateCityThirdParty(data) {
    return request(api_updateCityThirdParty, {
        method: 'POST',
        data
    });
}


